import { defineStore } from "pinia";

export const mainNav = defineStore("main", {
  state: () => {
    return {
      gameNav: null, //左侧导航游戏
      activeTab: null, //左侧导航-跳转指定分类游戏
      aboutusTab:null,//左侧导航关于我们-选中分类
    };
  },
  getters: {},

  actions: {},

  persist: {
    enabled: true,
    detached: true,
    strategies: [
      {
        key: "gameNav",
        storage: sessionStorage,
        paths: ["gameNav"]
      },
      {
        key: "activeTab",
        storage: sessionStorage,
        paths: ["activeTab"]
      },{
        key: "aboutusTab",
        storage: sessionStorage,
        paths: ["aboutusTab"]
      }
    ]
  }
});
